IF EXISTS (SELECT * FROM sysobjects where name = 'Sala' and xtype ='U')
	BEGIN
		PRINT 'La Tabla "dbo.Sala" ya existe.';
	END
ELSE
	BEGIN
		CREATE TABLE dbo.Sala		
		(	
			Id				int IDENTITY(1, 1) NOT NULL,
			IdOpenMeetings 	int NULL,
			Nombre 			nvarchar(100) NOT NULL,
			Comentario 		nvarchar(255) NULL,
			Tipo			int NOT NULL,
			TipoExterno 	nvarchar(100) NOT NULL,
			CantidadParticipantes int NOT NULL,
			EsPublica 		bit NOT NULL,
			ParaCitarse 	bit NOT NULL,
			ParaDemo		bit NOT NULL,
			DuracionDemo  	int NOT NULL,
			SalaModerada	bit NOT NULL,
			CONSTRAINT PK_SALA PRIMARY KEY(Id),
			CONSTRAINT UQ_SALA UNIQUE (Nombre)
		);
		PRINT 'La tabla "dbo.Sala" se ha creado correctamente.';
	END
GO